package com.kuang.method;

/**
 * @author wuJiaWei
 * @version 1.0
 * @date 2024/8/9
 * @time 14:43:24
 */
public class Demo04 {
    public static void main(String[] args) {
        printMax(17894,852259, 2, 3,11.2,16.9,9874);
    }

    public static void printMax(double... numbers) {
        if (numbers.length == 0) {
            System.out.println("No argument passed");
            return;
        }
        double max = numbers[0];
        for (int i = 1; i < numbers.length; i++) {
            if (numbers[i] > max) {
                max = numbers[i];
            }
        }
        System.out.println("The max value is " + (int)max);
    }


}
